<div class="tasks" ng-controller="TaskController" ng-init="initList()">

  <div class="tab-warp">
    <ul class="tab task-list">
      <li class="item" ng-class="status == null ? 'active' : '' "><a href="#/tasks">所有任务</a></li>
      <li class="item" ng-class="status == 'CLAIMED' ? 'active' : '' "><a href="#/tasks?status=CLAIMED">未完成任务</a></li>
      <li class="item" ng-class="status == 'FINISH' ? 'active' : '' "><a href="#/tasks?status=FINISH">已完成任务</a></li>
    </ul>
  </div>

  <div ng-show="tasks.length == 0" class="top-margin-20">
    <p class="top-margin-20 text-center gray-darker">暂无数据</p>
    <a class="btn client-btn" ng-href="#/advertisements?customerId={{customerId}}" style="width: 120px; margin: 20px auto">去认领</a>
  </div>

  <div class="list-warp" ng-hide="tasks.length == 0">
    <ul class="list ">
      <li ng-repeat="taskDto in taskDtos" ng-click="clickEvent(customer.id,taskDto.id)" class="item thumbnail-left">
        <div class="task">
          <img src="{{qiniuhost}}{{taskDto.brandImage}}!200" alt=""/>
          <div class="info">
            <h1>{{taskDto.title}}</h1>
            <p><strong class="text-danger" style="color: #D8685F; font-size: 14px;">{{taskDto.reward / 100}}&nbsp;</strong>元&nbsp;|&nbsp;<span ng-hide="{{taskDto.restDay == -1}}">还剩 <span style="color: #D8685F;">{{taskDto.restDay}}</span>天</span></p>
          </div>
          <div class="status text-center">
            <span class="label label-danger">{{taskDto.taskStatus}}</span>
          </div>
          <div class="operation text-center">
            <a class="btn btn-blue" href="#/{{customer.id}}/tasks/{{taskDto.id}}/detail">详情</a>
          </div>
        </div>
      </li>
    </ul>
  </div>

</div>
